< previous page page_293 next page >

Page 293
8160-0293a.gif
Figure 14.4
The DataGrid control in the toolbox.
DataGrid Common Properties
The DataGrid control has a few more properties than the other data-bound controls, and most have to do with controlling the grids behavior. Table 14.3 shows you the list of the properties youll most likely use.
Table 14.3 DataGrid Common Properties.
PropertyDescription
AllowAddNewSet this property to True if you want to allow the user to go to the last row in the grid to add a new row.
AllowDeleteSet this property to True if you want to allow the user to highlight a row and press the Delete key to delete a row from the table.
AllowUpdateSet this property to True if you want to allow the user to update a row.
ColumnHeadersSet this property to True if you want to have headers appear over each column.

Lets replace the list box for the health care choices on the Employee Information form with a DataGrid control that shows two fields from the tblHealthCare table. This table is also located in the Employees.mdb file that comes with the examples. Figure 14.5 shows what the form will look like after you add the DataGrid control.

 
< previous page page_293 next page >

If you like this book, buy it!